<%@ include file="/common/common.jsp"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<head>
<!--添加弹层效果和layui-->
<script type="text/javascript" src="<%=jsPath%>/layer/layer.js"></script>

<script>
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
    //加载
    $(document).ready(function () {
            //填充数据
            $("#listenType").lookup({ category: "ListenTerminal", selectedValue: 1 });
            //按钮点击事件
            $("#listenTerminalBtn").click(function () {
                console.log("点击获取参数");
                var valTemp = parseInt($("#listenType").val());
                var phoneNoTemp = $("#phoneNo").val();

                if (isNaN(valTemp)) {
                    layer.msg("请选择正确的监听类型");
                    return;
                }
                if (phoneNoTemp == "") {
                    layer.msg("请输入监听电话");
                    return;
                }
                //传递参数
                parent.$("#formParam1").val(valTemp);
                parent.$("#formParam2").val(phoneNoTemp);

                parent.layer.close(index);//关闭弹窗
                parent.listenAction();//父页面方法
            });
});

</script>
</head>
<body>
    <table width="100%" class="TableBlock">
        <tbody>
            <tr>
                <td colspan="2" style="font-weight: bold; background: #EFEFEF;" height="25">监听信息
                </td>
            </tr>
            <tr>
                <td align="right">监听类型:</td>
                <td><select id="listenType" style="width: 150px;" name="listenType" class="required digits">
                    </select></td>
            </tr>
            <tr>
                <td align="right">监听电话:</td>
                <td><input id="phoneNo" name="phoneNo" class="required digits" value="01088888888" maxlength="16" size="20">
                </td>
            </tr>
    
            <td colspan=2 align="center">
                <input id="listenTerminalBtn" type="button"  value="发送">
            </tr>
        </tbody>
    </table>
</body>